package com.cdivtc.management.dao;


import com.cdivtc.management.pojo.AchPatent;
import com.cdivtc.management.pojo.AchPatent;
import com.cdivtc.management.pojo.AchPatent;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.MySqlMapper;

import java.util.List;

public interface AchPatentMapper extends Mapper<AchPatent>, MySqlMapper<AchPatent> {


    //    校长查询为审核的成果
    @Select("SELECT *  from ach_patent WHERE state = '2' ")
    public List<AchPatent> queryAchBySchool();
    //退回   3通过  6 退回
    @Select("SELECT *  from ach_patent WHERE(  state = '3' or  state = '6'  ) ")
    public List<AchPatent> queryAchBySchoolpass();

    //    院长审核院级
    @Select("SELECT *  from ach_patent WHERE state = '1' and college = #{collage} ")
    public List<AchPatent> queryAchByCollage(String collage);//    院长审核院级

    @Select("SELECT *  from ach_patent WHERE (state = '5' or state = '3' or state = '2'  or state = '6') and college = #{collage}  ")
    public List<AchPatent> queryAchByCollagepass(String collage);
    //辅导员
    @Select("SELECT *  from ach_patent WHERE state = '0' and clazz_id = #{clazz} and grades >=101 ")
    public List<AchPatent> queryAchByClazz(String clazz);

    @Select("SELECT *  from ach_patent WHERE (state = '4' or state = '3' or state = '1'or state = '6' )and clazz_id = #{clazz} ")
    public List<AchPatent> queryAchByClazzpass(String clazz);

    @Select("SELECT *  from ach_patent WHERE uid=#{uid} and title like #{title}")
    public List<AchPatent> queryByAchTitleAndUid(@Param("uid") String uid, @Param("title") String title);




}